// 用户相关请求模块
import request from '@/utils/request'
// import store from '@/store/index'
// 用户登录
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/user/login',
    data: data
  })
}
// 用户注册
export const userRegister = (data) => {
  return request({
    method: 'POST',
    url: '/user',
    data: data
  })
}
// 管理员登录
export const adminLogin = (data) => {
  return request({
    method: 'POST',
    url: '/employee/login',
    data: data
  })
}
// 获取科室信息
export const getDepartmentInfo = () => {
  return request({
    method: 'GET',
    url: '/registration/department'
    // 发送请求头
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`
    // }
  })
}
// 根据科室id获取医生列表
export const getDoctorList = (id) => {
  return request({
    method: 'GET',
    url: `/registration/doctor/${id}`

  })
}
// 用户挂号

export const userBookNumber = (data) => {
  return request({
    method: 'POST',
    url: '/registration/add',
    data
  })
}
// 查询挂号列表

export const WaitingNumber = () => {
  return request({
    method: 'GET',
    url: '/registration/query'
  })
}
export const getNumber = (id) => {
  return request({
    method: 'GET',
    url: `/registration/query/user/${id}`
  })
}
export const delNumber = (id) => {
  return request({
    method: 'DELETE',
    url: `/registration/delete/${id}`
  })
}
